/**
 * Generali Solutions d'assurances - Tous droits réservés &copy; 2007 - 2010
 */

package fr.generali.accueilclient.opt.recherchemulticriteres.builder;

import fr.generali.accueilclient.opt.recherchemulticriteres.om.IClientRechMultiCriteres;
import fr.generali.accueilclient.opt.recherchemulticriteres.om.impl.DTOClientRechMultiCriteres;

/**
 * @author Holmes Kelly
 */
public class DTOClientRechMultiCriteresBuilder extends
                DTOClientRechMultiCriteresBuilderBase<DTOClientRechMultiCriteresBuilder> {

    /**
     * constructeur
     */
    public DTOClientRechMultiCriteresBuilder() {
        super(new DTOClientRechMultiCriteres());
    }

    /**
     * @return builder DTOClientRechMultiCriteresBuilder
     */
    public static DTOClientRechMultiCriteresBuilder dTOClientRechMultiCriteres() {
        return new DTOClientRechMultiCriteresBuilder();
    }

    /**
     * @return DTOClientRechMultiCriteres
     */
    public IClientRechMultiCriteres build() {
        return getInstance();
    }
}

/**
 * @author Holmes Kelly
 * @param <GeneratorT>
 */
class DTOClientRechMultiCriteresBuilderBase<GeneratorT extends DTOClientRechMultiCriteresBuilderBase<GeneratorT>> {

    /**
     * instance
     */
    private IClientRechMultiCriteres instance;

    /**
     * @param aInstance instance
     */
    protected DTOClientRechMultiCriteresBuilderBase(IClientRechMultiCriteres aInstance) {
        instance = aInstance;
    }

    /**
     * @return instance
     */
    protected IClientRechMultiCriteres getInstance() {
        return instance;
    }

    /**
     * @param aValue nom
     * @return GeneratorT
     */
    @SuppressWarnings("unchecked")
    public GeneratorT buildNom(String aValue) {
        instance.setNom(aValue);

        return (GeneratorT ) this;
    }

    /**
     * @param aValue prenom
     * @return GeneratorT
     */
    @SuppressWarnings("unchecked")
    public GeneratorT buildPrenom(String aValue) {
        instance.setPrenom(aValue);

        return (GeneratorT ) this;
    }

    /**
     * @param aValue libelle civilite
     * @return GeneratorT
     */
    @SuppressWarnings("unchecked")
    public GeneratorT buildLibelleCivilite(String aValue) {
        instance.setLibelleCivilite(aValue);

        return (GeneratorT ) this;
    }

    /**
     * @param aValue identifiantRCE
     * @return GeneratorT
     */
    @SuppressWarnings("unchecked")
    public GeneratorT buildIdentifiantRCE(String aValue) {
        instance.setIdentifiantRCE(aValue);

        return (GeneratorT ) this;
    }

    /**
     * @param aValue telephone principal
     * @return GeneratorT
     */
    @SuppressWarnings("unchecked")
    public GeneratorT buildTelephonePrincipal(String aValue) {
        instance.setTelephonePrincipal(aValue);

        return (GeneratorT ) this;
    }
}
